import cgi
import os

from django.utils import simplejson

os.environ['DJANGO_SETTINGS_MODULE'] = 'settings'
from google.appengine.dist import use_library
use_library('django', '1.1')

from google.appengine.ext import webapp

class RefererHandler(webapp.RequestHandler):
  def get(self, referer):
    if(referer != ""):
      self.redirect("/#/" + referer)
    else:
      self.response.out.write("Referer: %s" % referer)
    